/*
public class InterpolateBase{
	protected vcanvas 	Target;
	portected double	peroid;
	protected String	valueName;
	portected double	startTick;
	public StepIt(double tick);
}

public class FloatInterpolate extends InterpolateBase{
	protected 	float	m_startValue;
	protected	float 	m_endValue;
	//返回动画是否结束。
	public boolean StepIt(double tick)
	{
		double factor = (tick - startTick) / peroid;
		if(factor > 1.0)
		{
			return true;
		}
		Target.SetValue(valueName,(factor * (m_endValue - m_startValue) +m_startValue));
		return factor < 1.0;
	}
}

public class Vector2Interpolate extends InterpolateBase{
	protected 	Vector2	m_startValue;
	protected	Vector2	m_endValue;
}

public class ColorInterpolate extends InterpolateBase{
	protected 	Color	m_startValue;
	protected	Color 	m_endValue;
}

//public class ComposeInterpolate extends InterpolateBase{
//	protected	List<InterpolateBase>	m_list;
//}

public class InterpolateManager{
	public List<Interpolate> interpolate_list;
	public	AddInterpolate(interpolate,start,end,target,peroid){
		interpolate.startTick = GetTick();
		//....
	}
	
	public OnTick(float tick){
		for(i : interpolate_list)
		{
			if(i.StepIt(tick))
				interpolate_list.remove(i);
		}
	}
	
	public boolean isEmpty(){
		return interpolate_list.size() != 0;
	}
}


SystemTimer(){
	InterpolateManager.instance().OnTick(System.GetTick());
}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



public class Topic{
	public void Deactive(){
		//remove something from stage.
		//unsubscrible event from object.
		App.instance().UIObject.Unsubscrible("Second_Menu_changed",SecondMenuChanged);
	}

	public void SecondMenuChanged(String menu){
	}
	
	public void Active(){
		//add something from stage.
		//subscrible event.
		App.instance().UIObject.Subscrible("Second_Menu_changed",SecondMenuChanged);
	}
}

public class App{
	///概念有混乱。这里只应该是topic.360/Compare属于二级菜单。应该放入Topic子类中处理。
	public static final int PRESETATION_360 = 0;
	public static final int PRESETATION_COMPARE = 1;
	public static final int FEATURE = 2;
	public static final int COMPANYINFO = 3;
	public static final int DEPLOYMENT = 4;
	
	protected Topic topic[5];
	public vCanvas UIObject = null;
	protected int currentTopic = -1;
	public App(){
		topic[0] = new PreTopic();
		topic[1] = new Featoptic();
		topic[2] = new DeployTopic();
	}
	static public App instance(){
	}
	public void ActiveTopic(int topic){
		if(currentTopic == -1)
		{//first initialize. do some global init....
			//add UI vcanvas to Stage.
			UIObject = new UICanvas();
			Stage.AddChild(UIObject,10);
		}else if(currentTopic >= 0)
		{
			topic[currentTopic].Deactive();
		}
		topic[topic].Active();
	}
	
	public void TopicChanged(String topic){
		int topic = TranslateToInt(topic);
		if(topic != currentTopic)
		{
			ActiveTopic(topic);
		}
	}
}
public class jilu {
	
	/*背景视频.java
	 * 	|——Vcanvas 当前播放帧的事件
	 * 
	 
	 * 热区.java
	 * 	|_热区zhidao dangqian 视频是哪一个(全局视频对象)
	 * 
	 * UI(xml)
	 * 
	 * App当前处在那个主题下，要想赢主题切换的事件，负责几个主题的切换，
	 * 	|——3 
	 * topic
	 * ，Activite
	 * 
	 * 
	 * 
	 * 
	 * 
	 * 
	static void main(){
		//SetSystemTimer.
		App.instance().ActiveTopic(App.PRESETATION_360);
		App.UIObject.Subscribe("Topic_Changed",TopicChanged);
	}

}
*/
